package com.hdaccp.foodsales.controller;

import com.hdaccp.foodsales.entity.Vip;
import com.hdaccp.foodsales.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/huiyuan")
@Scope("prototype")
public class huiyuanController {

    @Autowired
    private VipService vipService;

    @RequestMapping("/query")
    @ResponseBody
    public List<Vip>query(){
        return vipService.findAll();
    }
}
